package com.grey_zoo.lottery.presenter;

import ZhongXinFenPai.TCallback;
import ZhongXinFenPai.TEvent;
import ZhongXinFenPai.TIntent;
import ZhongXinFenPai.TObserver;

import com.grey_zoo.lottery.engin.CommomEngin;
import com.grey_zoo.lottery.event.ImageLoaderEvent;
import com.grey_zoo.lottery.event.NetEvent;
import com.grey_zoo.lottery.global.GlobalValue;
import com.grey_zoo.lottery.util.PromptManager;
import com.tencent.connect.dataprovider.DataType.TextOnly;

public class NetEventManager implements TObserver {

	public NetEventManager() {

		RegisterEvent();
	}

	public void RegisterEvent() {

		TIntent.getInstance().registerEvent(NetEvent.class, this);

	}

	public static NetEventManager netmanager = new NetEventManager();

	@Override
	public void onEvent(TEvent event, TCallback callback)
			throws NoSuchMethodException, Exception, Exception {
		// TODO Auto-generated method stub

		
		
		NetEvent eventv = (NetEvent) event;

		// new MyHttpTaskSX().executeProxy(GlobalValue.SSQ);

		//PromptManager.showProgressDialog(GlobalValue.context);

		// TODO 自动生成的方法存根

		CommomEngin engin = new CommomEngin();

		try {
			GlobalValue.list_ssqResult = engin.getSSQData();

		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}

		eventv.handler.sendEmptyMessage(0);

	}

	public static NetEventManager getInstance() {
		return netmanager;

	}
}
